<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="spring" uri="/WEB-INF/tlds/spring.tld"%>
<%@ taglib prefix="c" uri="/WEB-INF/tlds/c.tld"%>
<%@ taglib prefix="fn" uri="/WEB-INF/tlds/fn.tld"%>
<%@ taglib prefix="fmt" uri="/WEB-INF/tlds/fmt.tld"%>
<c:set var="BasePath" value="${pageContext.request.contextPath}"></c:set>
<c:set var="Plugins" value="${pageContext.request.contextPath}/res/plugins"></c:set>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>次品退货详情</title>
<link href="${Plugins}/ligerUI/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />
<link href="${Plugins}/ligerUI/skins/ligerui-icons.css" rel="stylesheet" type="text/css" />
<script src="${Plugins}/datepicker/WdatePicker.js" type="text/javascript"></script>
<script src="${Plugins}/jquery/jquery-1.3.2.min.js"	type="text/javascript"></script>
<script src="${Plugins}/ligerUI/js/ligerui.min.js" type="text/javascript"></script>
<script src="${BasePath}/res/js/common/utils.js" type="text/javascript"></script>
<script src="${BasePath}/res/js/ligerCommon.js" type="text/javascript"></script>
<style type="text/css">
#searchbar{
	margin-bottom: 10px;
}
.navbar {
		height: 20px;
		border-bottom: #E6E6E6 solid 1px;
		line-height: 20px;
	}
.l-button-search{
	width: 50px;
	margin-left: 10px;
	padding-bottom: 2px;
	display: inline;
}
</style>
</head>
<body style="padding:6px; overflow:hidden;">
<div id="">
	<div class="navbar"><span>您当前的位置：商品管理 &gt;次品退货管理 &gt;次品退货详情 </span></div>
	<br/>
	<table width="100%" cellpadding="0" cellspacing="0" class="l-table-edit" style="TABLE-LAYOUT: fixed" >
	    <tr height="15">
	        <td align="right" class="l-table-edit-td">次品退货单号：</td>
	        <td align="left" class="l-table-edit-td">${po.defectReplceId }</td>
	    </tr>
	    
	</table>
	<br/>
</div>
<div id="maingrid6" style="margin:0; padding:0"></div>
  <div style="display:none;">
  <!-- g data total ttt -->
</div>

  <br/>
   &nbsp;&nbsp;<input  type="button" id="exit" style="margin-left: 1550px;" name="exit" value="返回" class="l-button l-button-test" >
  <br/>
<script type="text/javascript">
     var grid6 = null;
    var showList = "${showList}";
    $(function () {
      if(showList.toLowerCase() != "auhis") {
    	  var columns = [
    	            { display: '退换货编号', name: 'defectReplceId', align: 'left', width: '10%', render: function (rowdata, rowindex, value) {
    	            	return '<span title="' + value + '">' + value + '</span>';
    	            } },
    	            { display: '退换货名称', name: 'defectReplceName', width: '12%', render: function (rowdata, rowindex, value) {
    	            	value = StringUtils.html_encode(value);
    	            	return '<span title="' + value + '">' + value + '</span>';
    	            } },
    	           /*  { display: '退换货类型', name: 'replceType', width: '8%' , render: function (rowdata, rowindex, value) {
    	            	if (value == 1) {
    	            		return '退货';
    	            	} else if (value == 2) {
    	            		return '换货';
    	            	}  else {
    	            		return '';
    	            	}
    	            } }, */
    	            { display: '业务类型', name: 'replceType', width: '8%', render: function (rowdata, rowindex, value) {
    	            	if (value == 1) {
    	            		return '退货';
    	            	} else if (value == 2) {
    	            		return '换货';
    	            	}  else {
    	            		return '';
    	            	}
    	            }  },
    	            /* { display: '处理状态', name: 'processState', width: '8%' , render: function (rowdata, rowindex, value) {
    	            	if (value == 1) {
    	            		return '待退货出库';
    	            	} else if (value == 2) {
    	            		return '待换货入库';
    	            	}  else {
    	            		return '';
    	            	}
    	            }}, */
    	            { display: '供应商名称', name: 'supName', width: '8%' },
    	            { display: '货品编号', name: 'commoNo', width: '8%' },
    	            { display: '货品名称', name: 'commoName', width: '8%' },
    	           /*  { display: '审核人', name: 'Auditor', width: '8%' }, */
    	            { display: '创建时间', name: 'creatTime', width: '8%' },
    	            { display: '发起人', name: 'initiater', width: '8%' },
    	            { display: '发起时间', name: 'initiateTime', width: '8%' },
    	            { display: '仓库名称', name: 'whName', width: '8%' },
    	            { display: '退换货原因', name: 'reasonsReturn', width: '8%' }, 
    	            /* { display: '次品原因', name: 'defectiveReason', width: '8%' }  */
    	           
    	            ];
    	 
        grid6 = $("#maingrid6").ligerGrid({
            columns: columns, 
            pageSize: 30,
            width: '100%',
            height: '94%',
            dataType: 'server', 
            dataAction: 'server',
            pagesizeParmName: 'pageSize',
            enabledEdit:true,
            parms: [
                    {name: "DefectReplceId", value:'${po.defectReplceId }' }
            	],
            url: "ajaxToPoProductList.do"
        });
      }
        
    }); 
    
   
    /*显示采购单货品列表*/
    function showPoProds(){
    	window.location.href="showPoDetail.do?DefectReplceId=${po.defectReplceId}&showList=prods";
    }
    
    // 取消
    $("#exit").click(function() {
    	close_liger_tab();
    });
   
   
</script>
</body>
</html>